<?php
declare (strict_types=1);

namespace app\common\model;

class News extends Base
{
    protected $name = 'news';

    public function getTypeAttr($value)
    {
        return match ($value) {
            1 => '新闻',
            2 => '公告',
            default => ''
        };
    }

    public function getContentAttr($value)
    {
        return htmlspecialchars_decode($value);
    }


}
